package com.melesta.engine;

import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import com.facebook.Request;
import com.facebook.Session;
import com.facebook.widget.WebDialog;
import com.facebook.widget.WebDialog.FeedDialogBuilder;
import com.facebook.widget.WebDialog.OnCompleteListener;
import com.facebook.widget.WebDialog.RequestsDialogBuilder;

class Helpers
{
  static int goGetIntValue(Object paramObject, int paramInt)
  {
    if (paramObject != null)
      try
      {
        int i = ((Integer)paramObject).intValue();
        return i;
      }
      catch (Exception localException)
      {
      }
    return paramInt;
  }

  static void runFbRequestOnUiThread(EngineActivity paramEngineActivity, Request paramRequest)
  {
    paramEngineActivity.runOnUiThread(new Runnable()
    {
      public void run()
      {
        try
        {
          Request[] arrayOfRequest = new Request[1];
          arrayOfRequest[0] = this.val$request;
          Request.executeBatchAsync(arrayOfRequest);
          return;
        }
        catch (Exception localException)
        {
          Error.processException("runFbRequestOnUiThread", localException);
        }
      }
    });
  }

  static void showFeedDialogWithoutNotificationBar(Context paramContext, Bundle paramBundle, WebDialog.OnCompleteListener paramOnCompleteListener)
  {
    WebDialog localWebDialog = ((WebDialog.FeedDialogBuilder)new WebDialog.FeedDialogBuilder(paramContext, Session.getActiveSession(), paramBundle).setOnCompleteListener(paramOnCompleteListener)).build();
    localWebDialog.getWindow().setFlags(1024, 1024);
    localWebDialog.show();
  }

  static void showRequestDialogWithoutNotificationBar(Context paramContext, Bundle paramBundle, WebDialog.OnCompleteListener paramOnCompleteListener)
  {
    WebDialog localWebDialog = ((WebDialog.RequestsDialogBuilder)new WebDialog.RequestsDialogBuilder(paramContext, Session.getActiveSession(), paramBundle).setOnCompleteListener(paramOnCompleteListener)).build();
    localWebDialog.getWindow().setFlags(1024, 1024);
    localWebDialog.show();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.melesta.engine.Helpers
 * JD-Core Version:    0.6.2
 */